﻿@model LeadMaster.ViewModels.ViewModelPurchaseOrders

@using (Ajax.BeginForm("PurchaseOrder", "Leads", null, 
    new AjaxOptions
    {
        HttpMethod = "Post"
    }, 
    new { @id = "formCreatePO" }))
{
<fieldset>
<legend style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold">Add Purchase Order Block For The Next @Model.Lead.TotalWeeks Weeks</legend>    
<div class="spacer"></div>
<table class="listtable contactstable" cellspacing="0" cellpadding="0" style="width: 400px;">
<tr>
<th align="left"><label>Wk&nbsp;</label></th>
<th align="left"><label>Purchase Order Number</label></th>
<th align="left"><label>Quantity</label></th>
</tr>
@for (var i = 0; i < Model.NewPurchaseOrders.Count; i++) 
{
<tr>
<td>@(i+1)</td>
<td>
@Html.TextBoxFor(m => m.NewPurchaseOrders[i].PID, new { @class="FixedOP" })
</td>
<td>
@Html.TextBoxFor(m => m.NewPurchaseOrders[i].Quantity, new { @class = "FixedOP" })
@Html.HiddenFor(m => m.NewPurchaseOrders[i].LeadID)
@Html.HiddenFor(m  => m.NewPurchaseOrders[i].WeekNo)
@Html.HiddenFor(m  => m.NewPurchaseOrders[i].WeekBeginning)
@Html.HiddenFor(m  => m.NewPurchaseOrders[i].WeekEnding)
</td>
</tr>
}
</table>
</fieldset>
}
